package com.youngjun.user.api;

import com.youngjun.common.mybatis.web.Response;
import com.youngjun.user.pojo.vo.RegionVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Api(tags = "行政区域管理")
@FeignClient(
        name = "${ums.api.name:ums-service}",
        contextId = "IRegionRestApi",
        url  = "${ums.api.url:http://127.0.0.1:8080}",
        path = "/region"
)
public interface IRegionRestApi {

    @ApiOperation(value = "获取新增区域列表")
    @RequestMapping(method = RequestMethod.GET, path = "list")
    Response<List<RegionVO>> list(@RequestParam(value = "parentId", required = false) Long parentId);

}
